<?php include atemplate('header');?>

<table width="96%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="200" height="30" align="left" bgcolor="#B51C00"> 　<span class="STYLE8">图片分类</span></td>
    <td align="right" bgcolor="#B51C00">&nbsp;</td>
    <td width="100" align="center" bgcolor="#B51C00">&nbsp;</td>
    <td width="100" align="center" bgcolor="#B51C00" class="STYLE8">&nbsp;</td>
  </tr>
</table>
<form action="/admin/index.php?do=image&ac=class" method="post">
  <table width="96%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="200" height="30" align="left"><input name="classname" type="text" class="STYLE2"/></td>
      <td height="40" align="left"><input type="submit" value="提交分类" /></td>
    </tr>
  </table>
</form>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100" height="30" align="center">已添加的分类：</td>
    <td height="40" align="left"><?php foreach ($classlist as $val) {?>
      <span style="line-height:25px; height:25px; width:100px;float:left;"><a href="/admin/index.php?do=image&ac=list&classid=<?php echo $val['classid'];?>"><?php echo $val['classname'];?></a></span>
      <?php }?></td>
  </tr>
</table>
<br />
<br />
<form action="/admin/index.php?" method="get">
  <table width="96%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="200" height="30" align="left" bgcolor="#B51C00"> 　<span class="STYLE8">图片管理（共有&nbsp;<?php echo $count;?>&nbsp;幅图片）</span></td>
      <td align="right" bgcolor="#B51C00"><input name="keyword" type="text" class="STYLE2" id="keyword"  value="<?php echo $keyword;?>"/>
        <input type="submit" value="图片检索" /></td>
      <td width="100" align="center" bgcolor="#B51C00"><span class="STYLE8">
        <select name="classid" id="classid" onchange="this.form.submit()">
          <option value="0">所有分类</option>
          <?php echo $options;?>
        </select>
        </span></td>
      <td width="100" align="center" bgcolor="#B51C00" class="STYLE8"><a href="/admin/index.php?do=image&ac=add" style="color:#FFF">图片发布</a></td>
    </tr>
  </table>
  <input type="hidden" value="list" name="ac" />
  <input type="hidden" value="image" name="do" />
</form>
<br />
<table width="96%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="middle"><?php foreach ($list as $key=>$val) {?>
      <div style="float:left; width:200px; height:150px; text-align:center"><a href="../tupiandanye.php?contentid=<?php echo $val['id'];?>" target='_blank'><img src="../<?php echo $val['url'];?>" alt="<?php echo $val['title'];?>" width="180" height="120" border="0"/></a><br />
        <span style="width:190px; overflow:hidden; line-height:30px; height:30px;"><?php echo $val['title'];?>&nbsp;<a href="/admin/index.php?do=image&ac=edit&id=<?php echo $val['id'];?>">编辑</a>&nbsp;<a href="/admin/index.php?do=image&ac=del&id=<?php echo $val['id'];?>" onclick="return confirm('是否真的要删除此图片！');">删除</a></span> </div>
      <?php }?></td>
  </tr>
</table>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30" align="right" class="page"><?php echo $pagestr;?></td>
  </tr>
</table>
<?php include atemplate('footer');?>
